package cn.wolfcode.luowowo.community.service;

import cn.wolfcode.luowowo.community.domain.CommunityAnswer;
import cn.wolfcode.luowowo.member.domain.UserInfo;

import java.util.List;

/**
 * 社区问答的回复服务
 */
public interface ICommunityAnswerService {
    /**
     * 查询对应问题id的金牌回复
     * @param questionId
     * @return
     */
    CommunityAnswer queryGoldReplyByQuestionId(Long questionId);

    void save(CommunityAnswer communityAnswer);

    /**
     * 查对应问题id回复数量
     * @param questionId
     * @return
     */
    int QueryForCount(Long questionId);

    /**
     * 查询除了金牌回复的所有回复
     * @param questionId
     * @return
     */
    List<CommunityAnswer> QueryAllButGoldReply(Long questionId);

    /**
     * 添加问题的回复
     * @param questionId
     * @param userInfo
     * @param content
     */
    void addReply(Long questionId, UserInfo userInfo, String content);

    /**
     * 回复的顶的数量增加
     * @param answerId
     * @param count
     */
    void addThumb(String answerId, int count);
}
